// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::ReservationService].
#[async_trait::async_trait]
pub trait ReservationService: std::fmt::Debug + Send + Sync {
    async fn create_reservation(
        &self,
        req: crate::model::CreateReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>>;

    async fn list_reservations(
        &self,
        req: crate::model::ListReservationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReservationsResponse>>;

    async fn get_reservation(
        &self,
        req: crate::model::GetReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>>;

    async fn delete_reservation(
        &self,
        req: crate::model::DeleteReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn update_reservation(
        &self,
        req: crate::model::UpdateReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>>;

    async fn failover_reservation(
        &self,
        req: crate::model::FailoverReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>>;

    async fn create_capacity_commitment(
        &self,
        req: crate::model::CreateCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>>;

    async fn list_capacity_commitments(
        &self,
        req: crate::model::ListCapacityCommitmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListCapacityCommitmentsResponse>>;

    async fn get_capacity_commitment(
        &self,
        req: crate::model::GetCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>>;

    async fn delete_capacity_commitment(
        &self,
        req: crate::model::DeleteCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn update_capacity_commitment(
        &self,
        req: crate::model::UpdateCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>>;

    async fn split_capacity_commitment(
        &self,
        req: crate::model::SplitCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SplitCapacityCommitmentResponse>>;

    async fn merge_capacity_commitments(
        &self,
        req: crate::model::MergeCapacityCommitmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>>;

    async fn create_assignment(
        &self,
        req: crate::model::CreateAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Assignment>>;

    async fn list_assignments(
        &self,
        req: crate::model::ListAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListAssignmentsResponse>>;

    async fn delete_assignment(
        &self,
        req: crate::model::DeleteAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn search_assignments(
        &self,
        req: crate::model::SearchAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchAssignmentsResponse>>;

    async fn search_all_assignments(
        &self,
        req: crate::model::SearchAllAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchAllAssignmentsResponse>>;

    async fn move_assignment(
        &self,
        req: crate::model::MoveAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Assignment>>;

    async fn update_assignment(
        &self,
        req: crate::model::UpdateAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Assignment>>;

    async fn get_bi_reservation(
        &self,
        req: crate::model::GetBiReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BiReservation>>;

    async fn update_bi_reservation(
        &self,
        req: crate::model::UpdateBiReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BiReservation>>;

    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<iam_v1::model::Policy>>;

    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<iam_v1::model::Policy>>;

    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>>;

    async fn create_reservation_group(
        &self,
        req: crate::model::CreateReservationGroupRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReservationGroup>>;

    async fn get_reservation_group(
        &self,
        req: crate::model::GetReservationGroupRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReservationGroup>>;

    async fn delete_reservation_group(
        &self,
        req: crate::model::DeleteReservationGroupRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn list_reservation_groups(
        &self,
        req: crate::model::ListReservationGroupsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReservationGroupsResponse>>;
}

/// All implementations of [super::ReservationService] also implement [ReservationService].
#[async_trait::async_trait]
impl<T: super::ReservationService> ReservationService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_reservation(
        &self,
        req: crate::model::CreateReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>> {
        T::create_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_reservations(
        &self,
        req: crate::model::ListReservationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReservationsResponse>> {
        T::list_reservations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_reservation(
        &self,
        req: crate::model::GetReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>> {
        T::get_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_reservation(
        &self,
        req: crate::model::DeleteReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_reservation(
        &self,
        req: crate::model::UpdateReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>> {
        T::update_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn failover_reservation(
        &self,
        req: crate::model::FailoverReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Reservation>> {
        T::failover_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_capacity_commitment(
        &self,
        req: crate::model::CreateCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>> {
        T::create_capacity_commitment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_capacity_commitments(
        &self,
        req: crate::model::ListCapacityCommitmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListCapacityCommitmentsResponse>> {
        T::list_capacity_commitments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_capacity_commitment(
        &self,
        req: crate::model::GetCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>> {
        T::get_capacity_commitment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_capacity_commitment(
        &self,
        req: crate::model::DeleteCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_capacity_commitment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_capacity_commitment(
        &self,
        req: crate::model::UpdateCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>> {
        T::update_capacity_commitment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn split_capacity_commitment(
        &self,
        req: crate::model::SplitCapacityCommitmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SplitCapacityCommitmentResponse>> {
        T::split_capacity_commitment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn merge_capacity_commitments(
        &self,
        req: crate::model::MergeCapacityCommitmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CapacityCommitment>> {
        T::merge_capacity_commitments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_assignment(
        &self,
        req: crate::model::CreateAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Assignment>> {
        T::create_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_assignments(
        &self,
        req: crate::model::ListAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListAssignmentsResponse>> {
        T::list_assignments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_assignment(
        &self,
        req: crate::model::DeleteAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn search_assignments(
        &self,
        req: crate::model::SearchAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchAssignmentsResponse>> {
        T::search_assignments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn search_all_assignments(
        &self,
        req: crate::model::SearchAllAssignmentsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SearchAllAssignmentsResponse>> {
        T::search_all_assignments(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn move_assignment(
        &self,
        req: crate::model::MoveAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Assignment>> {
        T::move_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_assignment(
        &self,
        req: crate::model::UpdateAssignmentRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Assignment>> {
        T::update_assignment(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_bi_reservation(
        &self,
        req: crate::model::GetBiReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BiReservation>> {
        T::get_bi_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_bi_reservation(
        &self,
        req: crate::model::UpdateBiReservationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::BiReservation>> {
        T::update_bi_reservation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<iam_v1::model::Policy>> {
        T::get_iam_policy(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<iam_v1::model::Policy>> {
        T::set_iam_policy(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        T::test_iam_permissions(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_reservation_group(
        &self,
        req: crate::model::CreateReservationGroupRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReservationGroup>> {
        T::create_reservation_group(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_reservation_group(
        &self,
        req: crate::model::GetReservationGroupRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ReservationGroup>> {
        T::get_reservation_group(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_reservation_group(
        &self,
        req: crate::model::DeleteReservationGroupRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_reservation_group(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_reservation_groups(
        &self,
        req: crate::model::ListReservationGroupsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReservationGroupsResponse>> {
        T::list_reservation_groups(self, req, options).await
    }
}
